import { View, TextInput } from "react-native";
import { Ionicons } from "@expo/vector-icons";
import React from "react";
import { useTheme } from "@/contexts/ThemeContext";
import styles from "./index.style";

export default function SearchBar() {
  const { colors } = useTheme();
  return (
    <View
      style={[
        styles.container,
        {
          backgroundColor: colors.inputBackground,
        },
      ]}
    >
      <Ionicons
        name="search"
        size={20}
        color={colors.text.hint}
        style={styles.icon}
      />
      <TextInput
        placeholder="搜索"
        style={[styles.input, { color: colors.text.primary }]}
        placeholderTextColor={colors.text.hint}
      />
    </View>
  );
}
